﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Comm
{
    public static class GlobalValues
    {

        static GlobalValues()
        {
            Init();
        }
        public static void Init()
        {
            try
            {
            }
            catch (Exception ex)
            {
            }
        }
        /// <summary>
        /// Mes在线离线状态
        /// </summary>
        public static bool MesOnOff { get; set; }


        /// <summary>
        /// Mes组别校验开关
        /// </summary>
        public static bool MesGroupCheckOnOff { get; set; }
        /// <summary>
        /// 设备编号
        /// </summary>
        public static string EquNo { get; set; }
        /// <summary>
        /// 员工编号
        /// </summary>
        public static string EmpNo { get; set; } = "";
        /// <summary>
        /// 电解液料号
        /// </summary>
        public static string BatchNo { get; set; }
        /// <summary>
        /// 电解液批次号
        /// </summary>
        public static string BatchNo1 { get; set; }
        
        /// <summary>
        /// 电解液水含量
        /// </summary>
        public static string DJYWater { get; set; }
        /// <summary>
        /// 电解液氢氟酸含量
        /// </summary>
        public static string DJYHydrofluoric { get; set; }
        /// <summary>
        /// 胶钉批次号
        /// </summary>
        public static string JDBatchNo { get; set; }
        /// <summary>
        /// 变量注液
        /// </summary>
        public static bool EnableVarInj { get; set; }
        /// <summary>
        /// 工序类型 
        /// 一次注液：YC 
        /// 二次注液：EC 
        /// 三次注液：SC 
        /// </summary> 
        public static string OpType { get; set; }
        /// <summary>
        /// 工序代码
        /// </summary>
        public static string OpCode { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public static string Passwd { get; set; }

        /// <summary>
        /// 注液量标准值
        /// </summary>
        public static float InjValStd { get; set; }
        /// <summary>
        /// 注液量最小值
        /// </summary>
        public static float InjValMin { get; set; }
        /// <summary>
        /// 注液量最大值
        /// </summary>
        public static float InjValMax { get; set; }

        /// <summary>
        /// 总注液量标准值
        /// </summary>
        public static float InjValTotalStd { get; set; }
        /// <summary>
        /// 总注液量最小值
        /// </summary>
        public static float InjValTotalMin { get; set; }
        /// <summary>
        /// 总注液量最大值
        /// </summary>
        public static float InjValTotalMax { get; set; }

        /// <summary>
        /// 液矢量最小值
        /// </summary>
        public static float VectorMin { get; set; }
        /// <summary>
        /// 液矢量最大值
        /// </summary>
        public static float VectorMax { get; set; }
        /// <summary>
        /// 数据上传
        /// </summary>
        public static bool DataUpload { get; set; }
        /// <summary>
        /// 位置
        /// </summary>
        public static string Locate { get; set; }

        /// <summary>
        /// 上传模式
        /// </summary>
        public static string ProductModel { get; set; }
        /// <summary>
        /// 制令单
        /// </summary>
        public static string MoNumber { get; set; }
        /// <summary>
        /// 组别
        /// </summary>
        public static string GroupName { get; set; }
        /// <summary>
        /// 是否返工
        /// </summary>
        public static bool Rework { get; set; } = false;         
        /// <summary>
        /// 工序代码
        /// </summary>
        public static string GroupCode { get; set; }
        /// <summary>
        /// 物料号
        /// </summary>
        public static string ItemNo { get; set; }
        /// <summary>
        /// 物料批号
        /// </summary>
        public static string ItemBatchNo { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public static string ItemNum { get; set; }
        public static string BeforeWeightIP { get; set; }
        public static int BeforeWeightIPpPort { get; set; }
        public static string AfterWeightIP { get; set; }
        public static int AfterWeightIPPort { get; set; }
        public static int WeightTimeout { get; set; } = 5;

        /// <summary>
        /// 注液量范围，注液前最小值，注液后最大值判断
        /// </summary>
        public static bool? EnableBeforeInjectCheck { get; set; }
        public static bool? EnableAfterInjectCheck { get; set; }
        /// <summary>
        /// 注液前最小值 
        /// </summary>
        public static double BeforeWeightMin { get; set; }
        /// <summary>
        /// 注液前最大值
        /// </summary>
        public static double BeforeWeightMax { get; set; }
        /// <summary>
        /// 注液后最小值
        /// </summary>
        public static double AfterWeightMin { get; set; }
        /// <summary>
        /// 注液后最大值
        /// </summary>
        public static double AfterWeightMax { get; set; }

        /// <summary>
        /// 短路测试仪类型 1日置   2 锐捷
        /// </summary>
        public static int TestType { get; set; }  //测试仪类型 1日置   2 锐捷


        public static string MESUrl { get; set; } = "http://10.210.88.98:8070/MESInterface.asmx";

    }
}
